<template>
  <div>
    <span>{{item.shopName}}</span>
    <button @click="add">+</button>
    &nbsp;
    <span>{{item.count}}</span>
    &nbsp;
    <button @click="del">-</button>
  </div>
</template>

<script>
export default {
  props: {
    item: {
      type: Object,
      default() {
        return {}
      }
    },
    index: {
      type: Number,
      default: 0
    }
  },
  methods: {
    add() {
      this.$emit('add', this.index)
    },
    del() {
      this.$emit('del', this.index)
    }
  },
};
</script>

<style lang="scss" scoped>

</style>